﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace Kinlo.UI.Main.Converter
{
    public class ResultConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {

            try
            {
                if (value is null)
                {
                    return "";
                }if(value.ToString().ToUpper()=="TRUE"|| value.ToString().ToUpper() == "OK")
                {
                    return "OK";
                }else
                {
                    return "NG";
                }
            }
            catch (Exception ex)
            { 
                throw ex;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
